#ifndef _GRAPHICSCLASS_H_
#define _GRAPHICSCLASS_H_


#include <vector>
#include <cstdlib>
#include <ctime>
#include "d3dclass.h"
#include "cameraclass.h"
#include "textureshaderclass.h"
#include "bitmapclass.h"
#include "BackGroundRClass.h"
#include "BackGroundLClass.h"
#include "AnimatedBitmapClass.h"
#include "TextKlasser\textclass.h"
#include "EllapsedTimer.h"
#include "soundclass.h"

const bool FULL_SCREEN = false;
const bool VSYNC_ENABLED = true;
const float SCREEN_DEPTH = 1000.0f;
const float SCREEN_NEAR = 0.1f;

namespace frost
{
	using namespace grafik;
	using namespace text;

	/** \brief Klass som sk&ouml;ter om niv&aring; 1
	*
	*/
	class GraphicsClass
	{
	public:
		GraphicsClass();
		GraphicsClass(const GraphicsClass&);
		~GraphicsClass();

		bool Initialize(int, int, HWND);
		void Shutdown();
		bool Frame(int, int, int, int);
		bool Render();
		int GetPoints(){return m_points;}
		void SetPoints(int points){ this->m_points = points; }

	private:
		D3DClass* m_D3D;
		CameraClass* m_Camera;
		TextureShaderClass* m_TextureShader;
		BitmapClass* m_Bitmap;
		BackGroundRClass *m_BergBackgroundR;
		BackGroundLClass *m_BergBackgroundL;
		BackGroundRClass *m_TradBackgroundR;
		BackGroundLClass *m_TradBackgroundL;
		BackGroundRClass *m_BuskarBackgroundR;
		BackGroundLClass *m_BuskarBackgroundL;
		AnimatedBitmapClass *m_Fairy;
		AnimatedBitmapClass *m_Apple1;
		AnimatedBitmapClass *m_Apple2;
		AnimatedBitmapClass *m_Apple3;
		TextClass *m_Text;
		TextClass *m_Points;
		TextClass *m_TimeLeft;
		EllapsedTimer *m_timerApple;
		EllapsedTimer *m_timerBee;
		SoundClass *m_AppleCatch;
		SoundClass *m_BackgroundSound;
		SoundClass *m_BeeSound;
		SoundClass *m_BeeCrashSound;
		BitmapClass *m_Bee1;
		BitmapClass *m_Bee2;
		BitmapClass *m_Bee3;
		BitmapClass *m_Bee4;
		BitmapClass *m_Bee5;

		int offsetBerg;
		int offsetTrad;
		int offsetBuskar;
		int m_points;

		bool Box_Collide(BitmapClass *, BitmapClass *);
		void Apple_Collide();
		void Bee_Collide();

	public:
		vector<AnimatedBitmapClass*> AppleVector;
		vector<BitmapClass*> BeeVector;
	
	};
}
#endif